package com.qf.agro.common;

import com.qf.agro.pojo.SysUser;

/**
 * ProjectName: smart-agriculture-parent
 * ClassName: SysUserHolder
 * Author: chenyaosen
 * Date: 2023/7/1 21:00
 * Description:
 */
public class SysUserHolder {

    private static ThreadLocal<SysUser> threadLocal = new ThreadLocal<SysUser>();

    public static void set(SysUser sysUser){
        threadLocal.set(sysUser);
    }


    public static  SysUser  get(){
        return threadLocal.get();
    }


    public static void remove(){
        threadLocal.remove();
    }
}
